<?php
/*
 * Copyright (c) 2021.  Liuhongbin All rights reserved.
 * @domain http://dkyx.cc
 * @author liuhongbin <514660094@qq.com>
 */

namespace hiduoke\services\formBuilder\element;

use FormBuilder\Driver\CustomComponent;

class ElCollapse extends CustomComponent
{

    public function createValidate()
    {
    }

    /**
     * 是否手风琴模式
     * @param bool $accordion
     * @return ElCollapse
     */
    public function accordion($accordion = true)
    {
        return $this->props(['accordion' => $accordion]);
    }

    /**
     * 当前激活的面板(如果是手风琴模式，绑定值类型需要为string，否则为array)
     * @param string|array $value
     * @return ElCollapse
     */
    public function value($value)
    {
        return $this->props(['modelValue' => $value]);
    }
}
